package com.andy;

import com.andy.rpc.ProviderServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class MyRpcProviderApplication {

    public static void main(String[] args) throws InterruptedException {
        ConfigurableApplicationContext applicationContext =
                SpringApplication.run(MyRpcProviderApplication.class, args);

        ProviderServer providerServer = applicationContext.getBean(ProviderServer.class);
        providerServer.startServer(8999);
    }

}
